<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2020/1/3
 * Time: 10:59
 */

namespace app\api\controller\Validate;


use think\Validate;

class User extends Validate
{
    //配置当前验证器的默认规则
    protected $rule = [
        'userName' => 'require|max:25',
//        'password' => 'number',
        'email' => 'email',
    ];

    //配置当前验证器的错误提示消息
    protected $message = [
        'userName.require' => '名称必须',
//        'userName.max' => '名称最多不能超过25个字符',
//        'password.number' => '年龄必须是数字',
        'email' => '邮箱格式错误',
    ];
}